<?php
$id = $_GET['id'];
$link = mysqli_connect("localhost","root","root","2113");
$sql = "SELECT * FROM news WHERE id=$id";
// echo $sql;die;
$res = mysqli_query($link,$sql);
$one =  mysqli_fetch_assoc($res);

$one['addTime'] = date("Y-m-d H:i:s",$one['addTime']);


$arr = [];
if(!empty($one)){
	$arr['status'] = 1;
	$arr['info'] = $one;
} else{
	$arr['status'] = 0;
	$arr['info'] = "查询失败";
}

echo json_encode($arr);

?>